﻿@using System.Globalization
@using Microsoft.Extensions.Configuration;
@using Microsoft.AspNetCore.Identity
@using SimplCommerce.Module.Core.Models

@inject UserManager<User> UserManager
@inject IConfiguration Config

@{ 
    Layout = null;
}

<!DOCTYPE html>
<html ng-app="simplAdmin">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Admin - SimplCommerce</title>

    <link simpl-append-version="true" rel="stylesheet" href="~/lib/bootstrap/css/bootstrap.css" />
    <link simpl-append-version="true" rel="stylesheet" href="~/lib/font-awesome/css/font-awesome.css" />
    <link simpl-append-version="true" rel="stylesheet" href="~/lib/angular-material/angular-material.css" />
    <link simpl-append-version="true" rel="stylesheet" href="~/lib/angular-bootstrap/ui-bootstrap-csp.css" />
    <link simpl-append-version="true" rel="stylesheet" href="~/lib/toastr/toastr.css" />
    <link simpl-append-version="true" rel="stylesheet" href="~/lib/summernote/summernote.css" />
    <link simpl-append-version="true" rel="stylesheet" href="~/lib/angular-ui-tree/angular-ui-tree.min.css">
    <link simpl-append-version="true" rel="stylesheet" href="~/modules/core/admin/admin-core.css" />
    <script>
        window.Global_AssetVersion = "@Config["Global.AssetVersion"]";
    </script>
    <script simpl-append-version="true" src="~/lib/jquery/jquery.js"></script>
    <script simpl-append-version="true" src="~/lib/bootstrap/js/bootstrap.js"></script>
    <script simpl-append-version="true" src="~/lib/summernote/summernote.js"></script>
    <script simpl-append-version="true" src="~/lib/angular/angular.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-ui-router/angular-ui-router.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-animate/angular-animate.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-aria/angular-aria.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-messages/angular-messages.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-material/angular-material.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-smart-table/smart-table.js"></script>
    <script simpl-append-version="true" src="~/lib/ng-file-upload/ng-file-upload.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-bootstrap/ui-bootstrap.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-bootstrap/ui-bootstrap-tpls.js"></script>
    <script simpl-append-version="true" src="~/lib/bootstrap-ui-datetime-picker/datetime-picker.js"></script>
    <script simpl-append-version="true" src="~/lib/bootstrap-ui-datetime-picker/datetime-picker.tpls.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-summernote/angular-summernote.js"></script>
    <script simpl-append-version="true" src="~/lib/angular-ui-tree/angular-ui-tree.js"></script>
    <script simpl-append-version="true" src="~/lib/toastr/toastr.js"></script>
    <script simpl-append-version="true" src="~/lib/bootbox/bootbox.js"></script>
    <script simpl-append-version="true" src="~/lib/i18n/angular-locale_@(CultureInfo.CurrentCulture.Name.ToLower()).js"></script>

    <script simpl-append-version="true" src="~/modules/core/admin/admin-app.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/common/common.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/common/summernote-service.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/common/st-date-range.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/common/translation-service.js"></script>

    <script simpl-append-version="true" src="~/modules/core/admin/dashboard/dashboard.module.js"></script>

    <script simpl-append-version="true" src="~/modules/core/admin/core.module.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/user/user-service.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/user/user-list.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/user/user-form.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/widget/widget-service.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/widget/widget-instance-list.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/configuration/configuration-service.js"></script>
    <script simpl-append-version="true" src="~/modules/core/admin/configuration/configuration.js"></script>

    <script simpl-append-version="true" src="~/modules/catalog/admin/catalog.module.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/brand/brand-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/brand/brand-list.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/brand/brand-form.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/category/category-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/category/category-list.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/category/category-form.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-option/product-option-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-option/product-option-list.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-option/product-option-form.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-attribute-group/product-attribute-group-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-attribute-group/product-attribute-group-list.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-attribute-group/product-attribute-group-form.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-attribute/product-attribute-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-attribute/product-attribute-list.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-attribute/product-attribute-form.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-template/product-template-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-template/product-template-list.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-template/product-template-form.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product/product-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product/product-list.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product/product-selection-directive.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product/product-form.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-widget/product-widget-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/product-widget/product-widget-form.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/category-widget/category-widget-service.js"></script>
    <script simpl-append-version="true" src="~/modules/catalog/admin/category-widget/category-widget-form.js"></script>

    <script simpl-append-version="true" src="~/modules/orders/admin/orders.module.js"></script>
    <script simpl-append-version="true" src="~/modules/orders/admin/order/order-service.js"></script>
    <script simpl-append-version="true" src="~/modules/orders/admin/order/order-list.js"></script>
    <script simpl-append-version="true" src="~/modules/orders/admin/order/order-detail.js"></script>
    <script simpl-append-version="true" src="~/modules/orders/admin/order/order-widget.directive.js"></script>

    <script simpl-append-version="true" src="~/modules/cms/admin/cms.module.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/page/page-service.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/page/page-list.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/page/page-form.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/menu/menu-service.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/menu/menu-list.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/menu/menu-form.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/menu/menu-form-create.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/carousel-widget/carousel-widget-service.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/carousel-widget/carousel-widget-form.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/html-widget/html-widget-service.js"></script>
    <script simpl-append-version="true" src="~/modules/cms/admin/html-widget/html-widget-form.js"></script>

    <script simpl-append-version="true" src="~/modules/search/admin/search.module.js"></script>
    <script simpl-append-version="true" src="~/modules/search/admin/search-service.js"></script>
    <script simpl-append-version="true" src="~/modules/search/admin/most-search-keywords.directive.js"></script>

    <script simpl-append-version="true" src="~/modules/reviews/admin/reviews.module.js"></script>
    <script simpl-append-version="true" src="~/modules/reviews/admin/review/review-service.js"></script>
    <script simpl-append-version="true" src="~/modules/reviews/admin/review/review-list.js"></script>
    <script simpl-append-version="true" src="~/modules/reviews/admin/review/review-widget.directive.js"></script>
    
    <script simpl-append-version="true" src="~/modules/activity-log/admin/activitylog.module.js"></script>
    <script simpl-append-version="true" src="~/modules/activity-log/admin/activitylog-service.js"></script>
    <script simpl-append-version="true" src="~/modules/activity-log/admin/most-viewed-products.directive.js"></script>

    <script simpl-append-version="true" src="~/modules/vendors/admin/vendors.module.js"></script>
    <script simpl-append-version="true" src="~/modules/vendors/admin/vendors/vendor-service.js"></script>
    <script simpl-append-version="true" src="~/modules/vendors/admin/vendors/vendor-list.js"></script>
    <script simpl-append-version="true" src="~/modules/vendors/admin/vendors/vendor-form.js"></script>

    <script simpl-append-version="true" src="~/modules/localization/admin/localization.module.js"></script>
    <script simpl-append-version="true" src="~/modules/localization/admin/localization/localization-service.js"></script>
    <script simpl-append-version="true" src="~/modules/localization/admin/localization/localization-form.js"></script>
    <script simpl-append-version="true" src="~/modules/news/admin/news.module.js"></script>
    <script simpl-append-version="true" src="~/modules/news/admin/news-categories/news-category-service.js"></script>
    <script simpl-append-version="true" src="~/modules/news/admin/news-categories/news-category-list.js"></script>
    <script simpl-append-version="true" src="~/modules/news/admin/news-categories/news-category-form.js"></script>
    <script simpl-append-version="true" src="~/modules/news/admin/news-items/news-item-service.js"></script>
    <script simpl-append-version="true" src="~/modules/news/admin/news-items/news-item-list.js"></script>
    <script simpl-append-version="true" src="~/modules/news/admin/news-items/news-item-form.js"></script>

    <script simpl-append-version="true" src="~/modules/contacts/admin/contacts.module.js"></script>
    <script simpl-append-version="true" src="~/modules/contacts/admin/contact-area/contact-area-service.js"></script>
    <script simpl-append-version="true" src="~/modules/contacts/admin/contact-area/contact-area-list.js"></script>
    <script simpl-append-version="true" src="~/modules/contacts/admin/contact-area/contact-area-form.js"></script>
    <script simpl-append-version="true" src="~/modules/contacts/admin/contacts/contact-service.js"></script>
    <script simpl-append-version="true" src="~/modules/contacts/admin/contacts/contact-list.js"></script>
    <script simpl-append-version="true" src="~/modules/contacts/admin/contacts/contact.js"></script>
</head>
<body>
    <div class="navbar navbar-inverse">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a href="~/Admin" class="navbar-brand">SimplCommerce Admin</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    @if (User.IsInRole("admin"))
                    {
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@Localizer["Site"] <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a ui-sref="users">@Localizer["Users"]</a></li>
                            <li><a ui-sref="vendors">@Localizer["Vendors"]</a></li>
                            <li><a ui-sref="reviews">@Localizer["Reviews"]</a></li>
                        </ul>
                    </li>
                    }
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@Localizer["Catalog"] <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a ui-sref="product">@Localizer["Products"]</a></li>
                            @if(User.IsInRole("admin"))
                            {
                            <li><a ui-sref="category">@Localizer["Categories"]</a></li>
                            <li><a ui-sref="brand">@Localizer["Brands"]</a></li>
                            <li><a ui-sref="product-option">@Localizer["Product Options"]</a></li>
                            <li><a ui-sref="product-attribute-group">@Localizer["Product Attribute Groups"]</a></li>
                            <li><a ui-sref="product-attribute">@Localizer["Product Attributes"]</a></li>
                            <li><a ui-sref="product-template">@Localizer["Product Templates"]</a></li>
                            }
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@Localizer["Sales"] <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a ui-sref="order">@Localizer["Orders"]</a></li>
                        </ul>
                    </li>
                    @if (User.IsInRole("admin"))
                    {
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@Localizer["Content Management"] <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a ui-sref="page">@Localizer["Pages"]</a></li>
                            <li><a ui-sref="menus">@Localizer["Menus"]</a></li>
                            <li><a ui-sref="widget">@Localizer["Widgets"]</a></li>
                            <li><a ui-sref="news-categories">Manage News Categories</a></li>
                            <li><a ui-sref="news-items">Manage News Items</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@Localizer["System"] <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a ui-sref="configuration">@Localizer["Configuration"]</a></li>
                            <li><a ui-sref="localization">@Localizer["Translations"]</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@Localizer["Contact Management"] <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a ui-sref="contact-area">@Localizer["Manage Contact Area"]</a></li>
                            <li><a ui-sref="contact">@Localizer["Manage Contact"]</a></li>
                        </ul>
                    </li>
                    }
                </ul>
                <form asp-area="" asp-controller="Account" asp-action="LogOff" method="post" id="logoutForm" class="navbar-right">
                    <ul class="nav navbar-nav navbar-right">
                        <li>
                            <a asp-area="" asp-controller="Manage" asp-action="Index" title="Manage">@Localizer["Hello {0}!", UserManager.GetUserName(User)]</a>
                        </li>
                        <li>
                            <button type="submit" class="btn btn-link navbar-btn navbar-link">@Localizer["Log off"]</button>
                        </li>
                    </ul>
                </form>
            </div>
        </div>
    </div>

    <div class="container-fluid body-content">
        <div ui-view></div>
        <hr />
        <footer>
            <p class="pull-left">&copy; @DateTime.Now.Year - SimplCommerce</p>
            <p class="pull-right">Powered by <a href="http://www.SimplCommerce.com"><strong>SimplCommerce</strong></a></p>
        </footer>
    </div>
</body>
</html>
